package com.alibaba.csp.sentinel.adapter.dubbo;

import org.apache.dubbo.rpc.Filter;
import org.apache.dubbo.rpc.Invocation;
import org.apache.dubbo.rpc.Invoker;

/**
 * Base class of the {@link SentinelDubboProviderFilter} and {@link SentinelDubboConsumerFilter}.
 */
public abstract class BaseSentinelDubboFilter implements Filter {

    /**
     * Get method name of dubbo rpc
     */
    abstract String getMethodName(Invoker invoker, Invocation invocation, String prefix);

    /**
     * Get interface name of dubbo rpc
     */
    abstract String getInterfaceName(Invoker invoker, String prefix);
}
